﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="AddPeriodo.aspx.cs" Inherits="NewTierra.Pages.AddPeriodo" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">

    <link rel="stylesheet" href="http://code.jquery.com/ui/1.10.0/themes/base/jquery-ui.css" />
    <script src="http://code.jquery.com/jquery-1.8.3.js" type="text/javascript"></script>
    <script src="http://code.jquery.com/ui/1.10.0/jquery-ui.js" type="text/javascript"></script>

    <link href="../../Styles/EstiloGeral.css" rel="stylesheet" type="text/css" />

    <script type="text/javascript">

        jQuery(function ($) {
            $.datepicker.regional['pt-BR'] = {
                closeText: 'Fechar',
                prevText: '&#x3c;Anterior',
                nextText: 'Pr&oacute;ximo&#x3e;',
                currentText: 'Hoje',
                monthNames: ['Janeiro', 'Fevereiro', 'Mar&ccedil;o', 'Abril', 'Maio', 'Junho',
             'Julho', 'Agosto', 'Setembro', 'Outubro', 'Novembro', 'Dezembro'],
                monthNamesShort: ['Jan', 'Fev', 'Mar', 'Abr', 'Mai', 'Jun',
             'Jul', 'Ago', 'Set', 'Out', 'Nov', 'Dez'],
                dayNames: ['Domingo', 'Segunda-feira', 'Ter&ccedil;a-feira', 'Quarta-feira', 'Quinta-feira', 'Sexta-feira', 'Sabado'],
                dayNamesShort: ['Dom', 'Seg', 'Ter', 'Qua', 'Qui', 'Sex', 'Sab'],
                dayNamesMin: ['Dom', 'Seg', 'Ter', 'Qua', 'Qui', 'Sex', 'Sab'],
                weekHeader: 'Sm',
                dateFormat: 'dd/mm/yy',
                firstDay: 0,
                isRTL: false,
                showMonthAfterYear: false,
                yearSuffix: ''
            };
            $.datepicker.setDefaults($.datepicker.regional['pt-BR']);
        });

        $(function () {
            $("#from").datepicker({
                defaultDate: "+1w",
                changeMonth: true,
                changeYear: true,
                numberOfMonths: 1,
                onClose: function (selectedDate) {
                    $("#to").datepicker("option", "minDate", selectedDate);
                }
            });
            $("#to").datepicker({
                defaultDate: "+1w",
                changeMonth: true,
                changeYear: true,
                numberOfMonths: 1,
                onClose: function (selectedDate) {
                    $("#from").datepicker("option", "maxDate", selectedDate);
                }
            });
            $.datepicker.formatDate('yyyy-mm-dd');
        });

        function Teste() {
            alert("Foi");
        }

    </script>

    <title></title>

    <style type="text/css">
        #body
        {
            background-color: White;
            font-size: .80em;
            font-family: "Helvetica Neue", "Lucida Grande", "Segoe UI", Arial, Helvetica, Verdana, sans-serif;
            width: auto;
            height: 389px;
            margin-bottom: 0px;
        }

        #form1
        {
            width: 616px;
            height: 393px;
            margin-bottom: 0px;
        }

        #AddPeriodo
        {
            width: 599px;
            height: 376px;
            padding: 10px;
        }

            #AddPeriodo .esq
            {
                height: 258px;
                float: left;
                width: 257px;
            }

            #AddPeriodo .dir
            {
                height: 259px;
                float: left;
                width: 315px;
            }

            #AddPeriodo .Botoes
            {
                height: 78px;
                width: 572px;
                float: left;
            }

        .noites
        {
            height: 28px;
            width: 294px;
            float: left;
        }

            .noites .noites_drop
            {
                width: 102px;
                float: left;
                height: 25px;
            }

            .noites .noites_rdo
            {
                width: 179px;
                float: left;
            }

        .periodoDatas
        {
            width: 252px;
            height: 90px;
        }

            .periodoDatas .periodoDatas_into
            {
                width: 123px;
                float: left;
                height: 85px;
            }
    </style>

</head>
<body id="body">
    <form id="form1" runat="server">

        <div id="AddPeriodo">

            <fieldset style="width: 596px">
                <legend>Cadastrar Períodos</legend>


                <div class="esq">

                    <div class="periodoDatas">

                        <div class="periodoDatas_into">
                            <asp:Label ID="lblFrom" runat="server" Text="Data From:"></asp:Label>
                            <br />
                            <asp:TextBox ID="from" runat="server" Width="100px" MaxLength="10"></asp:TextBox>
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server"
                                ControlToValidate="from" ErrorMessage="*"
                                Font-Size="Small" ToolTip="Campo requerido." ValidationGroup="Salvar">*</asp:RequiredFieldValidator>
                            <br />

                            <asp:Label ID="lblTo" runat="server" Text="Data To:"></asp:Label><br />
                            <asp:TextBox ID="to" runat="server" Width="100px" MaxLength="10"></asp:TextBox>
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server"
                                ControlToValidate="to" ErrorMessage="*" Font-Size="Small"
                                ToolTip="Campo requerido." ValidationGroup="Salvar">*</asp:RequiredFieldValidator>
                        </div>

                        <div class="periodoDatas_into">
                            
                                <asp:Label ID="lblFdsFrom" runat="server" Text="Fds From:"></asp:Label><br />
                                <asp:DropDownList ID="ddlFdsFrom" runat="server">
                                    <asp:ListItem Value="0" Text="Nenhum" />
                                    <asp:ListItem Value="Seg" Text="Segunda" />
                                    <asp:ListItem Value="Ter" Text="Terça" />
                                    <asp:ListItem Value="Qua" Text="Quarta" />
                                    <asp:ListItem Value="Qui" Text="Quinta" />
                                    <asp:ListItem Value="Sex" Text="Sexta" />
                                    <asp:ListItem Value="Sab" Text="Sábado" />
                                    <asp:ListItem Value="Dom" Text="Domingo" />
                                </asp:DropDownList>
                            <br />

                                <asp:Label ID="lblFdsTo" runat="server" Text="Fds To:"></asp:Label><br />
                                <asp:DropDownList ID="ddlFdsTo" runat="server">
                                    <asp:ListItem Value="0" Text="Nenhum" />
                                    <asp:ListItem Value="Seg" Text="Segunda" />
                                    <asp:ListItem Value="Ter" Text="Terça" />
                                    <asp:ListItem Value="Qua" Text="Quarta" />
                                    <asp:ListItem Value="Qui" Text="Quinta" />
                                    <asp:ListItem Value="Sex" Text="Sexta" />
                                    <asp:ListItem Value="Sab" Text="Sábado" />
                                    <asp:ListItem Value="Dom" Text="Domingo" />
                                </asp:DropDownList>
                        </div>

                    </div>

                    <asp:Label ID="lblEstacao" runat="server" Text="Estação/Pacote:"></asp:Label><br />
                    <asp:DropDownList ID="DropEstacao" runat="server" AutoPostBack="True" Width="150px" OnSelectedIndexChanged="DropEstacao_SelectedIndexChanged">
                    </asp:DropDownList>
                    <br />

                    <asp:Panel ID="PanelNomePacote" runat="server" Visible="false">
                        <asp:TextBox ID="txtNomePacote" runat="server" placeholder="Nome do pacote" TextMode="MultiLine" Height="30px" Width="200px" MaxLength="100" />
                        <br />
                    </asp:Panel>

                    <asp:Label ID="lblMercado" runat="server" Text="Mercado:"></asp:Label><br />
                    <asp:DropDownList ID="DropMercado" runat="server" Width="150px">
                    </asp:DropDownList>
                    <br />

                    <asp:Label ID="lblBaseTarifariaTXT" runat="server" Text="Base Tarifária:"></asp:Label><br />
                    <asp:DropDownList ID="DropBaseTarifaria" runat="server" Width="150px">
                    </asp:DropDownList>
                    <br />
                </div>

                <div class="dir">                    
                    <asp:Label ID="lblResponsavelTXT" runat="server" Text="Responsável:"></asp:Label><br />
                    <asp:DropDownList ID="ddlResponsavel" runat="server" Width="330px">
                    </asp:DropDownList>
                    <br />

                    <asp:Label ID="lblMoeda" runat="server" Text="Moeda:"></asp:Label><br />
                    <asp:DropDownList ID="DropMoeda" runat="server" Width="90px">
                    </asp:DropDownList>
                    <br />

                    <asp:Label ID="lblMinimodeNoites" runat="server" Text="Noites:"></asp:Label>

                    <div class="noites">
                        <div class="noites_drop">
                            <asp:DropDownList ID="DropQtdNoites" runat="server" AutoPostBack="True" Width="90px" OnSelectedIndexChanged="DropQtdNoites_SelectedIndexChanged">
                            </asp:DropDownList>
                        </div>
                        <div class="noites_rdo">
                            <asp:RadioButtonList ID="rdoNoites" runat="server" RepeatDirection="Horizontal" Width="180px" Visible="False">
                                <asp:ListItem Value="0" Text="Mínimo" Selected="True" />
                                <asp:ListItem Value="1" Text="Mandatório" />
                            </asp:RadioButtonList>
                        </div>
                    </div>
                    <br />

                    <asp:Label ID="lblPromocaoTXT" runat="server" Text="Promoção:"></asp:Label><br />
                    <asp:DropDownList ID="DropPromocao" Width="90px" runat="server">
                    </asp:DropDownList>
                    <br />

                     <p class="paragrafo">
                        <asp:TextBox ID="txtRemarks" runat="server" TextMode="MultiLine" placeholder="Remarks" Text="" Width="330px" Height="67px" />
                    </p>

                </div>

                <div class="Botoes">                   

                    <asp:Label ID="lblSupplierMostrar" runat="server" Text="Supplier:"></asp:Label>
                    &nbsp<asp:Label ID="lblSupplier" runat="server" Font-Size="Small" Text="Supplier"></asp:Label>
                    <br />
                    <br />

                    <asp:Button ID="btnSalvarPeriodo" CssClass="btnsGeral" runat="server" Text="Salvar" ValidationGroup="Salvar" OnClick="CadastrarPeriodo" />
                    <asp:Button ID="btnAtualizarPeriodo" CssClass="btnsGeral" runat="server" Text="Atualizar" ValidationGroup="Salvar"
                        OnClick="AtualizarPeriodo" Visible="false" />
                    &nbsp;<asp:Button ID="btnFechar" CssClass="btnsGeral" runat="server" OnClientClick="window.close();" Text="Fechar" />
                    <br />

                    <asp:Label ID="lblMsgAddPeriodo" runat="server" Font-Bold="True" ForeColor="#CC0000"></asp:Label>
                </div>


            </fieldset>

        </div>

    </form>
</body>
</html>
